const state = {
  userDragData: {},
  userDragFlag: false,
  userDragContent: [],
  userDragID: null,
  userMenuVisible: null,
  userMenuVisibleTwo: null,
  userDelectContent: null,
};
const actions = {};
const mutations = {
  USER_DRAG_DATA: (state, userDragData) => {
    state.userDragData = userDragData;
  },
  USER_DRAG_FLAG: (state, userDragFlag) => {
    state.userDragFlag = userDragFlag;
  },
  USER_DRAG_CONTENT: (state, userDragContent) => {
    state.userDragContent = userDragContent;
  },
  USER_DRAG_ID: (state, userDragID) => {
    state.userDragID = userDragID;
  },
  USER_MENU_VISIBLE: (state, userMenuVisible) => {
    state.userMenuVisible = userMenuVisible;
  },
  USER_MENU_VISIBLE_TWO: (state, userMenuVisibleTwo) => {
    state.userMenuVisibleTwo = userMenuVisibleTwo;
  },
  USER_DELECT_CONTENT: (state, id) => {
    state.userDragContent = state.userDragContent.filter((item) => {
      return item.id != id;
    });
    state.userDragID = null;
  },
};
export default {
  namespaced: true,
  state,
  mutations,
  actions,
};
